<include file='Public:header'/>  

  <!-- Start: Content -->
  <section id="content">
    <div id="topbar" class="affix">
      <ol class="breadcrumb">
       <li style="font-size:1.3em"><a href="<?php echo U('Index/index') ?>"><span>返回首页</span></a></li>
        <li style="font-size:1.3em"><a href="javascript:void(0)" onclick="history.go(-1)" class="back"><span>返回上一层</span></a></li>
		 <?php   foreach ($loadgame as $k=>$v) { ?><?php  }?>
		 <li style="font-size:1.3em"><span>  <?php echo ($loadgame[0]['referrer']).'下属代理'; ?></span></li>
      </ol>
    </div>
    <div class="container">

	 <div class="row">
        <div class="col-md-12">
			<div class="panel">
				<div>
					<form action="" method="get" id="form">
						<div class="panel-heading" style="float:left">
						 ID：<input style="outline:none;height:30px;border-radius:8px;" id="username" name="userid" value="" type="" class="txt">
						</div>
						 <div class="panel-heading" style="float:left">
						 姓名：<input style="outline:none;height:30px;border-radius:8px;" id="username" name="name" value="" type="" class="txt">
						</div>
						<div class="panel-heading" style="float:left;width:62%;">
						 注册时间：
						 <input type="text" class="Wdate" name="sdate" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss ',readOnly:true})" style="height:30px;font-size:1px;border-radius:8px;"/>
						--
						<input type="text" class="Wdate" name="edate" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss ',readOnly:true})" style="height:30px;font-size:1px;border-radius:8px;"/>
						<input style="float:right;width:20%;height:25px;border-radius:9px;background:##bbb4bb;color:#000;line-height:2px;outline:none" type="submit" name="soso" value="搜索" class="btn">
						</div>
					</form>
				</div>
              
                <div class="panel-body">

				
                  <table class="table table-striped table-bordered table-hover dataTable">
                      <tr class="active">
                        <th>下级代理ID</th>
                        <th>代理级别</th>
						<th>代理电话</th>
						<th>代理姓名</th>
						<th>房卡数</th>
                        <th>所属地 </th>
                        <th>注册IP</th>
                        <th>注册时间</th>
                        <th>上级代理为</th>
                        <!-- <th width="200">操作</th> -->
                      </tr>
					
					    <?php   foreach ($loadgame as $k=>$v) { ?>
                    	<tr class="success">
						<!-- 其中转账任属性 以及转账前钻石 都为需要加的数据  现在外网数据库加的  ，以后更改 -->
                        <td><a style="color:#ce0528" href="<?php echo U('Index/loadgame',array('userid'=>$v['userid'])) ?>"><?php echo $v['accounts']?></a></td>
                        <td><?php if($v['agencylv']==1){echo '一级代理';}elseif($v['agencylv']==2){echo '二级代理';}elseif($v['agencylv']>2){echo '普通代理';}?></td>
                        <td><?php echo $v['phone']?></td>
                        <td><?php echo $v['username']?></td>
                        <td><?php echo $v['gems']?></td>
                        <td><?php echo $v['region'] ?></td>
                        <td><?php echo $v['ip'] ?></td>
                        <td><?php echo $v['regtime'] ?></td>
						<td><?php echo $v['referrer'] ?></td></tr>
						<?php }?>              
                  <div class="pull-right">
                    <ul class="pagination" id="paginator-example">
                      <?php echo $page?>
                    </ul>
                  </div>  
                </div>
              </div>
          </div>
        </div>
    </div>
  </section>
  <script type="text/javascripe">
    $(function(){
          // 分页（修改链接方法）
        $('#paginator-example a').click(function(){ 
                    
            var tmpHref = $(this).attr('href');
            tmpHref = tmpHref.replace(/\/selCon\//,"");
            $("#form").attr("action", tmpHref);
            $("#form").submit();
                    
            return false; 
        });
    }

	
	
	$(function(){
        //查询
        $("#selecting").click(function(){
            $("#form").attr("action", "__URL__/listDept/p/1");
            $("#form").submit();
        });
    }

  </script>
  <!-- End: Content -->
<include file='Public:footer'/>   